<?php foreach ($css as $cs): ?>
<?php use_stylesheet($cs->getCss()) ?>
<?php endforeach ?>

<table  align="center" width='80%'cellpadding="15">
    <?php foreach ($pager->getResults() as $article): ?>
    <tr><td><table width='1000%'>
    <tr><td class="blog" align="center" bgcolor="#b5b7b7"><?php echo $article->getTitre() ?></td></tr>
    <tr><td class="blog" height='230px'bgcolor="#FFFFFF"><?php echo $article->getContenu() ?></td></tr>
    <tr><td>
    <table width=100% cellpadding="0" cellspacing="0">
    <tr><td class="blog" bgcolor="#b5b7b7" align="center"><?php echo " Posté le ".$article->getDateCreation('d-m-Y')." par ".$article->getAuteur()."" ?></td>
    <td class="blog" align="center"  bgcolor=#b5b7b7>
    <?php echo link_to('ajouter commentaire','commentaire/new?id_article='.$article->getIdArticle().'&&id_blog='.$id_blog.'') ?>
    <?php echo link_to(''.$article->getNbCommentaire().' commentaire(s)','commentaire/index?id_article='.$article->getIdArticle().'&&id_blog='.$id_blog.'') ?></td></tr>
    </table></td>
    </tr>
    </table></td></tr>
    <?php endforeach; ?>
</table>

  <?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'article/index?page='.$pager->getFirstPage().' & id_blog='.$id_blog) ?>
  <?php echo link_to('&lt;', 'article/index?page='.$pager->getPreviousPage().' & id_blog='.$id_blog) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
    <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'article/index?page='.$page.' & id_blog='.$id_blog) ?>
    <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'article/index?page='.$pager->getNextPage().' & id_blog='.$id_blog) ?>
  <?php echo link_to('&raquo;', 'article/index?page='.$pager->getLastPage().' & id_blog='.$id_blog) ?>
   <?php endif ?>
   <br><br>
  <a href="<?php echo url_for('article/new?id_blog='.$id_blog) ?>">Créer un nouvel article</a>
